﻿#region Includes
using System;
using System.Runtime.InteropServices;
#endregion

namespace GingerGL.Graphics.Models.MD3
{
    //------------------------------------------------------------//
    /// <summary>
    /// IDS MD3 FRAME
    /// </summary>
    [StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Ansi)]
    public struct MD3Frame
    {
        //--------------------------------------------------------//
        #region Variables
        static public readonly int MD3_MAX_FRAMES = 1024;
        [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.R4, SizeConst = 3)]
        public float[] MinBounds;                               //First corner of the bounding box.
        [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.R4, SizeConst = 3)]
        public float[] MaxBounds;                               //Second corner of the bounding box.
        [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.R4, SizeConst = 3)]
        public float[] LocalOrigin;                             //Local origin, usually (0, 0, 0).
        [MarshalAs(UnmanagedType.R4)]
        public float Radius;                                    //Radius of bounding sphere.
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
        public char[] Name;                                     //Name of Frame. ASCII character string, NUL-terminated (C-style)
        #endregion
        //--------------------------------------------------------//
    }
    //------------------------------------------------------------//
}
